using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using System.Linq;
using System.Text;

namespace HOPE
{
    class Hud
    {
        private ScreenManager screenManager;

        public static float HudHeight;

        public static bool isActive { get; set; }

        #region Graphics Data

        private Texture2D upPanelTex;

        private Vector2 upPanelPos = new Vector2(0, 0);
        //private Vector2 namePosition = new Vector2(0, 0);

        #endregion

        #region Initialization

        ///<summary>
        ///Creates new hud with screenmanager
        ///</summary>

        public Hud(ScreenManager screenManager)
        {
            //check the parameter
            if (screenManager == null)
            {
                throw new ArgumentNullException("screenManager");
            }
            this.screenManager = screenManager;

            isActive = true;
        }

        ///<summary>
        ///load the graphics from content manager
        ///</summary>

        public void LoadContent()
        {
            ContentManager content = (screenManager.Game as HopeGame).StaticContent;

            upPanelTex = content.Load<Texture2D>(@"Textures/Interface/StatusBar/Panel/playerpanel");
        }

        #endregion

        #region Drawing

        ///<summary>
        ///draw the screen
        ///</summary>

        public void Draw()
        {
            SpriteBatch spriteBatch = screenManager.SpriteBatch;

            spriteBatch.Begin();

            spriteBatch.Draw(upPanelTex, upPanelPos, null, Color.White, 0, new Vector2(0, 0), 1, SpriteEffects.None, 0.95f);

            spriteBatch.End();
        }

        #endregion



    }
}
